Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@alwatr/fetch

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alwatr/fetch

Enhanced fetch api with timeout, helper methods and types written in tiny TypeScript module.

  • 0.7.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
231
increased by5.48%
Maintainers
1
Weekly downloads
 
Created
Source

@alwatr/fetch

Enhanced fetch API with the timeout, helper methods, and types written in tiny TypeScript, ES module.

Options

Options inherited from the RequestInit. you can watch all documents of the parameters RequestInit in fetch init parameters

Options have two other parameters:

  • bodyObject: a JSON object that converts to string and put on the body.
  • queryParameters: a JSON object that converts to URL query params

Example usage

import {getJson} from 'https://esm.run/@alwatr/fetch';

const productList = await getJson('/api/products', {limit: 10}, {timeout: 5_000});

Keywords

FAQs

Package last updated on 12 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc